<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    .txt:focus {
        outline: none;
        border: 2px solid red;
    }

    .box {
        width: 400px;
        height: 50px;
    }

    /**当前元素或当前元素下的子元素聚焦时触发*/
    .box:focus-within {
        background-color: aquamarine;
    }

    span:has(+input[required]):after {
        content: "*";
        color: red;
    }

    .text::first-letter{
        font-weight: bold;
        font-size: 40px;
        text-transform: uppercase;
        float: left;
        line-height: 1;
        margin-right: 10px;
        font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
    }


    .text::selection{
        text-decoration: underline;
        color: red;
        background-color: aqua;
    }
</style>

<body>
    <form>
        <div class="box">
            <span>账号</span>
            <input required class="txt" type="text"></input>
        </div>
        <div class="box">
            <span>密码</span>
            <input required class="txt" type="text"></input>
        </div>
        <div class="box">
            <span>邮箱</span>
            <input class="txt" type="text"></input>
        </div>
    </form>

    <hr />
    <p class="text">
        Lost time is never found again. This is something which I learned very clearly last semester. I spent so much
        time fooling around that my grades began to suffer. I finally realized that something had to be done. It was
        time for a change.Now I have a new plan for using my time wisely. I have set my alarm clock ahead half an
        hour. This will give me a head start on the day. I have also decided to keep a log of what I do and when I do
        it. Looking back on what I’ve done will give me some ideas on how to reorganize my time.
    </p>
</body>

</html>